package com.stylefeng.guns.modular.netcar.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.stylefeng.guns.core.validater.Insert;
import com.stylefeng.guns.core.validater.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
 /**
 * 驾驶员信息
 *
 * @author sasazaixian
 * @Date 2018-10-23 11:06
 * @TableField(exist = false) 实现属性与数据库字段不一一对应
 */
 @Data
 @EqualsAndHashCode(callSuper=true)
 @TableName("driver_inf")
public class DriverInf extends Model<DriverInf> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     * 自动生成后修改成实际的主键 
     */
    @TableId(value = "di_id", type = IdType.UUID)
    @ApiModelProperty(value = "司机ID")
    @NotNull(message="司机ID不能为空",groups = Update.class)
    private String diId;     //司机ID
    @Override
    protected Serializable pkVal() {
        return this.diId;
    }
    
    //扩展能查询字段
    @TableField(exist = false)
    @ApiModelProperty(value = "查询条件 是否过滤 0:不过滤（查询当前对象数据）1：过滤（查询机构数据）")
    @NotNull(message = "是否过滤查询不能为空")
    private String key ;
    //开始日期
    @TableField(exist = false)
    @JSONField(serialize = false)
    private String sdate;
    //截止日期 
    @TableField(exist = false)
    @JSONField(serialize = false)
	private String edate;
    //排序字段
    @TableField(exist = false)
    @JSONField(serialize = false)
	private String  sortField ;
	//排序	
	@TableField(exist = false)
    @JSONField(serialize = false)
	private String sortOrder;

    @ApiModelProperty(value = "车企ID 可查询子机构驾驶员")
    @TableField(exist = false)
    private String soIdAll;


     @ApiModelProperty(value = "车企 +驾驶员")
     @TableField(exist = false)
     private String realDiName;


     @ApiModelProperty(value = "车企 +车牌号")
     @TableField(exist = false)
     private String viVehiclePlate;

     @ApiModelProperty(value = "车牌号")
     @TableField(exist = false)
     private String realViVehiclePlate;

     @ApiModelProperty(value = "车牌编号")
     @TableField(exist = false)
     private String vehicleNo;

    @ApiModelProperty(value = "车企ID")
    @TableField("so_id")
    @NotNull(message="车企ID不能为空",groups = {Insert.class, Update.class})
    private String soId;     //车企ID

    @ApiModelProperty(value = "用户真实姓名")
    @TableField("di_name")
    @NotNull(message="用户真实姓名不能为空",groups = {Insert.class, Update.class})
    private String diName;     //用户真实姓名

    @ApiModelProperty(value = "登录密码")
    @TableField("di_password")
    @NotNull(message="登录密码不能为空",groups = {Update.class})
    private String diPassword;     //登录密码

    @ApiModelProperty(value = "手机号")
    @TableField("di_phone")
    @NotNull(message="手机号不能为空",groups = {Insert.class, Update.class})
    private String diPhone;     //手机号

    @ApiModelProperty(value = "性别")
    @TableField("di_sex")
    @NotNull(message="性别不能为空",groups = {Insert.class, Update.class})
    private String diSex;     //性别

    @ApiModelProperty(value = "驾驶员工号")
    @TableField("di_no")
    private String diNo;     //驾驶员工号

    @ApiModelProperty(value = "所属区域")
    @TableField("region_code")
    private String regionCode;     //所属区域

    @ApiModelProperty(value = "驾照类型")
    @TableField("di_license_type")
    private String diLicenseType;     //驾照类型

    @ApiModelProperty(value = "身份证号")
    @TableField("di_license_no")
    @NotNull(message="身份证号不能为空",groups = {Insert.class, Update.class})
    private String diLicenseNo;     //身份证号

    @ApiModelProperty(value = "初次领证日期")
    @TableField("di_first_obtain_date")
    private Date diFirstObtainDate;     //初次领证日期

    @ApiModelProperty(value = "是否启用，1正常使用，0已禁用")
    @TableField("di_is_alived")
    private String diIsAlived;     //是否启用，1正常使用，0已禁用

    @ApiModelProperty(value = "驾照正面照片路径")
    @TableField("di_license_front_photo")
    private String diLicenseFrontPhoto;     //驾照正面照片路径

    @ApiModelProperty(value = "驾照反面照片路径")
    @TableField("di_license_back_photo")
    private String diLicenseBackPhoto;     //驾照反面照片路径

    @ApiModelProperty(value = "创建人")
    @TableField("create_user")
    private String createUser;     //创建人

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;     //创建时间

    @ApiModelProperty(value = "更新人")
    @TableField("update_user")
    private String updateUser;     //更新人

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;     //更新时间

    @ApiModelProperty(value = "备注")
    @TableField("note")
    private String note;     //备注

    @ApiModelProperty(value = "司机头像地址")
    @TableField("di_icon")
    private String diIcon;     //司机头像地址

    @ApiModelProperty(value = "所属车队")
    @TableField("di_dept_id")
    private String diDeptId;     //所属车队

    @ApiModelProperty(value = "从业资格证有效期-开始日期")
    @TableField("di_certificate_start_date")
    private Date diCertificateStartDate;     //从业资格证有效期-开始日期

    @ApiModelProperty(value = "从业资格证有效期截止日期")
    @TableField("di_certificate_end_date")
    private Date diCertificateEndDate;     //从业资格证有效期截止日期

    @ApiModelProperty(value = "是否审核  0:未审核;1:已审核")
    @TableField("di_check_result")
    private String diCheckResult;     //是否审核  0:未审核;1:已审核

    @ApiModelProperty(value = "审核日期")
    @TableField("di_check_date")
    private Date diCheckDate;     //审核日期

    @ApiModelProperty(value = "审核人")
    @TableField("di_check_psn")
    private String diCheckPsn;     //审核人

    @ApiModelProperty(value = "登录终端ID")
    @TableField("di_registrationid")
    private String diRegistrationid;     //登录终端ID

    @ApiModelProperty(value = "加盟状态：1,有车加盟;2,无车加盟;3,加盟后租车")
    @TableField("di_join_car")
    private String diJoinCar;     //加盟状态：1,有车加盟;2,无车加盟;3,加盟后租车

    @ApiModelProperty(value = "盐")
    @TableField("di_salt")
    private String diSalt;     //盐

    @ApiModelProperty(value = "当前拥有任务数")
    @TableField("di_task_num")
    private Integer diTaskNum; //当前拥有任务数

    @ApiModelProperty(value = "驾驶员登录的设备id")
    @TableField("di_client_id")
    private String diClientId; //驾驶员登录的设备id

     @ApiModelProperty(value = "车辆id")
     @TableField("vi_id")
     private String viId; //车辆id


}
